Electronic devices (such as phones, media players, computing devices, and so on) may include acoustic devices (such as microphones or speakers) in order to provide the capability to produce or record sound. The electronic devices may provide some kind of exposure (such as an opening in a housing) to an external environment in order for sound waves to pass to and/or from an acoustic device in order for the acoustic device to function. However, such exposure may make the electronic device and/or the acoustic device vulnerable to contaminants from the external environment such as liquid, dust, and so on.